#ifndef OBSERVABLE_H
#define OBSERVABLE_H

#include <set>
#include "Observer.h"

/*-------------------------------------------------------------------------------------------------
--
--	CLASS: Observable
--
--	Date: March 27, 2010
--
--	REVISIONS (Date and Description):
--
--	DESIGNER: Erick Ribeiro
--
--	PROGRAMMER: Erick Ribeiro
--
--  INTERFACE: class Observable
--
--  RETURNS: N/A
--
--	NOTES: Extendable class that allows a class to become an "Observer". Basically maintains
--         a list of objects to watch over. When a specific event occurs, that observer class
--         can "notify" all objects within its watch list of this event. Each object in the list
--         can respond appropriately. 
--
-------------------------------------------------------------------------------------------------*/
class Observable
{
public:
	Observable ();
	void addObserver (Observer * observer);
	void removeObserver (Observer * observer);

protected:
	void notifyAll (int eventCode);

private:
	std::set<Observer *> observers;
};

#endif
